package com.example.consulconsumer.service;

import com.example.consulconsumer.service.impl.HelloServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

//value里的服务名称需要小写
@FeignClient(value = "consul-producer", fallback = HelloServiceImpl.class)
public interface IHelloService {
    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    String hiService(@RequestParam(value = "name") String name);
}
